<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        [xxx='p2']{
            color:red;

        }
    </style>

</head>
<body>
<p>p1</p>
<p xxx="p2">p2</p>
<p xxx="p3">p3</p>

<div xxx="p2">div1</div>




</body>
</html>